package com.akkainaction.dispatcher.hello;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import com.akkainaction.dispatcher.hello.actor.ActorPinnedDemo;
import com.typesafe.config.ConfigFactory;

public class TestActorPinnedDemo {

    public static void main(String[] args) {
        ActorSystem system = ActorSystem.create("sys", ConfigFactory.load("pinned-dispatcher"));
        for (int i = 0; i < 20; i++) {
            ActorRef ref = system.actorOf(Props.create(ActorPinnedDemo.class).withDispatcher("my-pinned-dispatcher"), "actorDemo" + i);
            ref.tell("hello pinned", ActorRef.noSender());
        }
    }
}
